<style>
	.number{border:1px solid #f2f2f2;display:block;width:20px;text-align:center;float:left;}
	a{cursor:pointer}
      .current{text-decoration:underline;background:#37BC9B;color:white;border-radius:5px;}
</style>
<table id="table"  style="width:90%;margin-left:5%;">
	<foreach name="data" item="value">
		<tr >
			<td style="width:10%;text-align:center;border-bottom:1px solid gray">
				<input class="radio" type="radio" name="leader_id" value="{$value.audience_id}" />
			</td>
			<td style="width:80%;text-align:center;border-bottom:1px solid gray">{$value.audience_name}</td>
		</tr>
	</foreach>
	<tr>
		<td id="page" colspan=2>{$page}</td>
	</tr>
</table>

<script type="text/javascript">
	$("#close").click(function(){
		var value = $(".radio:checked").val();
		$("#leader").val(value);
		$(".leader_box").css({display:"none"});
		$("#check_leader").css({display:"none"});

	});

	$(".prev").click(function(){
		var current = $(".current").attr("title");
		current -=1;
		$.ajax({
			url:"__URL__/forAct2",
			data:{"page":current},
			type:"get",
			success:function(data){
				$("#table").parent().html(data);
			}
		});
	});
	$(".next").click(function(){
		var current = $(".current").attr("title");
		current +=1;									
		$.ajax({
			url:"__URL__/forAct2",
			data:{"page":current},
			type:"get",
			success:function(data){											
				$("#table").parent().html(data);
			}
		});
									
	});
	$(".last").click(function(){
		var current = $(this).attr("name");										
		$.ajax({
			url:"__URL__/forAct2",
			data:{"page":current},
			type:"get",
			success:function(data){											
				$("#table").parent().html(data);
			}
		});
	});

	$(".first").click(function(){
		$.ajax({
			url:"__URL__/forAct2",
			data:{"page":1},
			type:"get",
			success:function(data){													
				$("#table").parent().html(data);
			}
		});
	});

	$(".number").click(function(){
		var num = $(this).attr("title");
		$.ajax({
			url:"__URL__/forAct2",
			data:{"page":num},
			type:"get",
			success:function(data){
				$("#table").parent().html(data);
			}
		});
	});
//选择领导
	$(".radio").click(function(){
		$("#close").html("<span style='color:white;font-weight:bold;font-size:12px;background:#37BC9B;padding:3px;border-radius:2px;'>确定并返回</span>");
	});
</script>